﻿using System;

namespace MSDNWebcast.ViewModels
{
    /// <summary>
    /// 工作页签
    /// </summary>
    public abstract class WorkspaceViewModel : ViewModelBase
    {
        /// <summary>
        /// 是否处于选中状态
        /// </summary>
        private bool m_IsActive;

        /// <summary>
        /// 页面信息
        /// </summary>
        private string m_PageInfo;

        /// <summary>
        /// 显示名称
        /// </summary>
        public abstract String DisplayName { get; }

        /// <summary>
        /// 活动的工作页签
        /// </summary>
        public bool IsActive
        {
            get { return m_IsActive; }
            set
            {
                if (value != m_IsActive)
                {
                    m_IsActive = value;
                    OnPropertyChanged("IsActive");
                }
            }
        }

        /// <summary>
        /// 页面信息
        /// </summary>
        public string PageInfo
        {
            get { return m_PageInfo; }
            set
            {
                if (value != m_PageInfo)
                {
                    m_PageInfo = value;
                    OnPropertyChanged("PageInfo");
                }
            }
        }
    }
}